<?php include_once './application/views/sys_admin/common/header.php';  ?>
<div class=" definewidth m20">
		<form  aid="searchForm" action="/sys_admin/cps/cpsuserlist" method="get" class="form-inline definewidth m20">
  			会员名：<input type="text" id="username" name="username" style="width: 100px;" value="<?php echo  $where['username']?>" />
  			手机号：<input type="text" id="phone" name="phone" style="width: 100px;" value="<?php echo  $where['phone']?>" />
  			开始时间：<input type="text" id="strtime" name="strtime" style="width: 100px;" value="<?php echo  $where['strtime'];?>"  class="Wdate" onfocus="WdatePicker()" />
  			结束时间：<input type="text" id="endtime" name="endtime" style="width: 100px;" value="<?php echo  $where['endtime'];?>"  class="Wdate" onfocus="WdatePicker()" />
  			<button type="button" class="btn btn-primary"  onclick="this.form.submit();" >查询</button>
	  	</form>
		<table class="table table-bordered table-hover definewidth m10">
			 <thead>
			    <tr>
			       <!-- 
					<th><strong>ID</strong></th>
					 -->
					<th><strong>会员ID </strong></th>
					<th><strong>真实姓名 </strong></th>
					
					<th><strong>注册时间</strong></th>
					<th><strong>注册时长(天)</strong></th>
					<th><strong>推广码</strong></th>
					<th><strong>推广会员数 </strong></th>
					<th><strong>充值会员数 </strong></th>
					<th><strong>推广会员理财总额</strong></th>
					<th><strong>佣金总额 </strong></th>
					<th><strong>操作</strong></th>
			    </tr>
			   </thead>
			 <?php if($user_list){foreach ($user_list as $v){?>
			  	 <tr>
				<td><?php echo $v['user_id'];?></td> 
				<td><?php echo $v['realname'];?></td>
				<td><?php echo  date('Y-m-d',$v['add_time']);?></td>
				<td><?php echo  floor((time()-$v['add_time'])/86400);?></td>
				
				<td><?php echo $v['user_id'];?></td>
				<td>
					<a href="javascript:;" onclick="queryDetail(<?php echo $v['user_id'];?>);">
			 			<?php echo $v['totalcpsu'];?>
			 	</td>
				
				<td><?php echo $v['rechg_count'];?></td>
				<td><?php echo $v['licaimoney'];?></td>
				
				<td><?php echo $v['cpsmoney'];?></td>
				<td>
			 		<a href="javascript:;" onclick="queryDetail(<?php echo $v['user_id'];?>);">查看推广会员明细</a> 
			 	</td>
				</tr>	
			  <?php }}?>
			  	<tr>
			  	<td colspan="12"  class="invbd_page"><?php echo $this->pagination->create_links();?></td>
			  	</tr>
		</table>
</div>
<div id="querydialog" title="查看推广会员明细" style="display:none">
	<div id="view_query_response"></div>
</div>

